import {
  PlayerInfo,
  PlayerProperty,
  PlayerState,
  PlayerWearableEquipments
} from "./types";

export const initUserInfo = (): PlayerInfo => {
  return {
    sexName: "男",
    userName: "",
    isLogin: false,
    sex: 1,
    characterIndex: 6,
    money: 0,
    state: 0
  };
};
export const initUserProperty = (): PlayerProperty => {
  return {
    STR: 5,
    VIT: 5,
    DEX: 5,
    CHP: 125,
    HP: 100
  };
};
export const inituserWearableEquipments = (): PlayerWearableEquipments => {
  return {
    weapon: undefined,
    lorica: undefined,
    necklace: undefined
  };
};

const playerState: PlayerState = {
  userInfo: initUserInfo(),
  userProperty: initUserProperty(),
  userPackage: [],
  userWearableEquipments: {},
  userTowerLevel: {}
};

export default playerState;
